package com.ruoyi.system.service.impl.user;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.user.VsUserScoreLogMapper;
import com.ruoyi.system.domain.user.VsUserScoreLog;
import com.ruoyi.system.service.user.IVsUserScoreLogService;

/**
 * 会员积分变动Service业务层处理
 * 
 * @author zzx
 * @date 2024-04-30
 */
@Service
public class VsUserScoreLogServiceImpl implements IVsUserScoreLogService 
{
    @Autowired
    private VsUserScoreLogMapper vsUserScoreLogMapper;

    /**
     * 查询会员积分变动
     * 
     * @param id 会员积分变动主键
     * @return 会员积分变动
     */
    @Override
    public VsUserScoreLog selectVsUserScoreLogById(Long id)
    {
        return vsUserScoreLogMapper.selectVsUserScoreLogById(id);
    }

    /**
     * 查询会员积分变动列表
     * 
     * @param vsUserScoreLog 会员积分变动
     * @return 会员积分变动
     */
    @Override
    public List<VsUserScoreLog> selectVsUserScoreLogList(VsUserScoreLog vsUserScoreLog)
    {
        return vsUserScoreLogMapper.selectVsUserScoreLogList(vsUserScoreLog);
    }

    /**
     * 新增会员积分变动
     * 
     * @param vsUserScoreLog 会员积分变动
     * @return 结果
     */
    @Override
    public int insertVsUserScoreLog(VsUserScoreLog vsUserScoreLog)
    {
        vsUserScoreLog.setCreatetime(System.currentTimeMillis());
        return vsUserScoreLogMapper.insertVsUserScoreLog(vsUserScoreLog);
    }

    /**
     * 修改会员积分变动
     * 
     * @param vsUserScoreLog 会员积分变动
     * @return 结果
     */
    @Override
    public int updateVsUserScoreLog(VsUserScoreLog vsUserScoreLog)
    {
        return vsUserScoreLogMapper.updateVsUserScoreLog(vsUserScoreLog);
    }

    /**
     * 批量删除会员积分变动
     * 
     * @param ids 需要删除的会员积分变动主键
     * @return 结果
     */
    @Override
    public int deleteVsUserScoreLogByIds(Long[] ids)
    {
        return vsUserScoreLogMapper.deleteVsUserScoreLogByIds(ids);
    }

    /**
     * 删除会员积分变动信息
     * 
     * @param id 会员积分变动主键
     * @return 结果
     */
    @Override
    public int deleteVsUserScoreLogById(Long id)
    {
        return vsUserScoreLogMapper.deleteVsUserScoreLogById(id);
    }
}
